﻿using System;
using System.Collections.Generic;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Text;
using Alma.Infrastructure;

namespace Alma.Models
{
    [Table(Name = "WorkExps")]
    public class WorkExperienceInfo : NotificationObject
    {
        public WorkExperienceInfo() { }

        public WorkExperienceInfo(AccountInfo account)
        {
            AccountGuid = account.Guid;
        }

        public WorkExperienceInfo(string _accountGuid)
        {
            AccountGuid = _accountGuid;
        }

        #region Fields
        private int id;
        private string accountGuid;
        private DateTime startDate = DateTime.Now;
        private DateTime endDate;
        private string company;
        private string industry;
        private string companySize;
        private string companyType;
        private string department;
        private string jobTitle;
        private string description;
        #endregion

        #region Properties
        [Column(Name = "Id", IsPrimaryKey = true, CanBeNull = false, IsDbGenerated = true, DbType = "INT NOT NULL Identity", AutoSync = AutoSync.OnInsert)]
        public int Id
        {
            get { return id; }
            set
            {
                id = value;
                RaisePropertyChanged(() => Id);
            }
        }

        [Column]
        public string AccountGuid
        {
            get { return accountGuid; }
            set
            {
                accountGuid = value;
                RaisePropertyChanged(() => AccountGuid);
            }
        }

        [Column]
        public DateTime StartDate
        {
            get { return startDate; }
            set
            {
                startDate = value;
                RaisePropertyChanged(() => StartDate);
            }
        }

        [Column]
        public DateTime EndDate
        {
            get { return endDate; }
            set
            {
                endDate = value;
                RaisePropertyChanged(() => EndDate);
            }
        }

        [Column]
        public string Company
        {
            get { return company; }
            set
            {
                company = value;
                RaisePropertyChanged(() => Company);
            }
        }

        [Column]
        public string Industry
        {
            get { return industry; }
            set
            {
                industry = value;
                RaisePropertyChanged(() => Industry);
            }
        }

        [Column]
        public string CompanySize
        {
            get { return companySize; }
            set
            {
                companySize = value;
                RaisePropertyChanged(() => CompanySize);
            }
        }

        [Column]
        public string CompanyType
        {
            get { return companyType; }
            set
            {
                companyType = value;
                RaisePropertyChanged(() => CompanyType);
            }
        }

        [Column]
        public string Department
        {
            get { return department; }
            set
            {
                department = value;
                RaisePropertyChanged(() => Department);
            }
        }

        [Column]
        public string JobTitle
        {
            get { return jobTitle; }
            set
            {
                jobTitle = value;
                RaisePropertyChanged(() => JobTitle);
            }
        }

        [Column]
        public string Description
        {
            get { return description; }
            set
            {
                description = value;
                RaisePropertyChanged(() => Description);
            }
        }
        #endregion
    }
}
